module.exports = function(sequelize, DataTypes) {
  var Log = sequelize.define('log', {
    uid: {
      type: DataTypes.INTEGER
    },
    ip: {
      type: DataTypes.STRING(40)
    },
    action: {
      type: DataTypes.STRING(20),
      allowNull: false
    },
    desctiption: {
      type: DataTypes.STRING(300)
    },
    result: {
      type: DataTypes.STRING(30)
    },
    show: {
      type: DataTypes.INTEGER,
      defaultValue: 1 //1显示，0不显示
    }
  },
  {
    freezeTableName: true,
    tableName: 't_logs',
  })
  return Log
}
